package com.jyxd.web.data.dictionary;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.annotations.GenericGenerator;

import javax.persistence.*;
import java.io.Serializable;
import java.util.Date;

/**
 * 监护仪字典表
 */
@Entity
@Table(name = "dict_monitor")
@Data
public class MonitorDictionary implements Serializable {

    /**
     * 序列
     */
    private static final long serialVersionUID = 1L;

    /**
     * 主键ID
     */
    @Id
    @Column(name = "id", length = 32, nullable = false)
    @GeneratedValue(generator = "system-uuid")
    @GenericGenerator(name = "system-uuid", strategy = "uuid.hex")
    private String id;

    /**
     * 监护仪code
     */
    @Column(name = "monitor_code")
    private String monitorCode;

    /**
     * 监护仪名称
     */
    @Column(name = "monitor_name")
    private String monitorName;

    /**
     * 状态（0：禁用 1：正常 -1：删除）
     */
    @Column(name = "status")
    private int status;

    /**
     * 监护仪类型
     */
    @Column(name = "monitor_type")
    private String monitorType;

    /**
     * 监护仪IP
     */
    @Column(name = "monitor_ip")
    private String monitorIp;

    /**
     * 监护仪端口
     */
    @Column(name = "monitor_port")
    private String monitorPort;

    @ApiModelProperty(name = "监护仪类型code：监护仪为1，中央监护站为2")
    @Column(name = "type_code")
    private Integer typeCode;

    /**
     * 监护仪厂家id
     */
    @Column(name = "manufacturers_id")
    private String manufacturersId;

    /**
     * 监护仪的方式：客户端/服务端
     */
    @Column(name = "device_role")
    private String deviceRole;
    /**
     * 连接方式：直连/非直连
     */
    @Column(name = "connect_type")
    private String connectType;

    /**
     * 关联科室编码
     */
    @Column(name = "office_code")
    private String officeCode;

    /**
     * 关联科室名称
     */
    @Column(name = "office_name")
    private String officeName;

    @Column(name = "tenant_id")
    private String tenantId;

    @Column(name = "monitor_series_number")
    private String monitorSeriesNumber;

    @Column(name = "manufacturers_name")
    private String manufacturersName;

    @Column(name = "procurement_date")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private Date procurementDate;
}